<html>
	<head>
		<meta name="layout" content="main"></meta>
		<title>${category?.label}</title>
	</head>
	<body>
		<g:if test="${category}">
			<p>Jobs for ${category.label}</p>
			<g:if test="${!category.jobs}">
				<p>There are currently no available jobs for ${category.label}.
					<g:link controller="job" action="create">Post a new job.</g:link>
				</p>
			</g:if>
			<g:else>
				<g:render template="jobtable" model="[jobs:category.jobs]"/>
			</g:else>
		</g:if>
		<g:if test="${recentJobs}">
			<p>Recent Jobs</p>
			<g:render template="jobtable" model="[jobs:recentJobs]"/>
			<p>
				<b>Total</b>(${Job.count()}) <g:each var="cat" in="${allCategories}"><b>${cat.label}</b>(${cat.countJobs()}) </g:each>
			</p>
		</g:if>
	</body>
</html>
